﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>美淼仓库管理系统</title>
    <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/ui.jqgrid.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css1.css")" rel="stylesheet" type="text/css" />
    @Sprite.ImportStylesheet("~/App_Sprites/")
    
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/grid.locale-cn.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.jqGrid.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.ui.datepicker-zh-CN.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/grid.defaults.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/helpers.js")" type="text/javascript"></script>
    <style type="text/css">
        #change-password label, #change-password input { display: block; }
        #change-password input.text { margin-bottom: 12px; width: 95%; padding: .4em; }
        #change-password fieldset { padding: 0; border: 0; margin-top: 25px; }
        #west-grid .cell-wrapperleaf { cursor: pointer; }
        .ui-widget { font-size: 12px; }
        #printdiv { width: 649px; font-size:12px; }
        #printdiv table { border-top: solid 1px rgb(170,170,170); border-left: solid 1px rgb(170,170,170); }
        #printdiv th, #printdiv td { padding:3px; border-bottom: solid 1px rgb(170,170,170); border-right: solid 1px rgb(170,170,170); }
    </style>
    <script type="text/javascript">
        $.ajaxSetup({
            //headers: {"Cache-Control":"no-cache", "If-Modified-Since": "0"}
            cache: false
        });
//        $(function () {
//            $("button").click(function () {
//                $("link:first").attr("href", "http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/black-tie/jquery-ui.css");
//            });
//        })
        $(function () {
            var arr;
            $.ajax({
                url: '/home/leftmenu', 
                success: function (data) {
                    var items = [];
                    arr = data.url;
                    $.each(data.img, function (index, value) {
                        items.push('<li><img class="'+ value +'" src="" /><span>' + data.span[index] + '</span></li>');
                    });
                    $(items.join('')).prependTo('.lanmu ul');
                    init(arr);
                }
            });
        });
        function init(arr) {
            $(".lanmu li span").hover(function () {
                $(this).parent().addClass('hover');
            }, function () {
                $(this).parent().removeClass('hover');
            });
            $(".lanmu li span").click(function () {
                $.each($(".lanmu li span"), function (i, n) {
                    $(n).parent().removeClass("clickbg");
                });
                $(this).parent().addClass("clickbg");
            });


            var maintab = $('#tabs');

            $.each($(".lanmu li span"), function (i, n) {
                //n.data("d", {id: "#tr"+i, title: n.val(), url: arr[i]});
                $(n).click(function () {
                    if ($(n).html() == "修改密码") {
                        $("#change-password").dialog("open");
                        return;
                    }
                    var st = "#t" + i;
                    if ($(st).html() != null) {
                        maintab.tabs('select', st);
                    }
                    else {
                        maintab.tabs('add', st, $(n).html());
                        $.ajax({
                            global: false,
                            url: arr[i],
                            type: "GET",
                            dataType: "html",
                            beforeSend: function () {
                                $("#contentCover, #contentLoading").css("display", "block");
                            },
                            complete: function (req, err) {
                                $(st, "#tabs").append(req.responseText);
                                $("#contentCover, #contentLoading").css("display", "none");
                                try {
                                    var pageTracker = _gat._getTracker("UA-5463047-4");
                                    pageTracker._trackPageview();
                                }
                                catch (err) { };
                            }
                        });
                    }
                });
            });
        }
    </script>
    @RenderSection("Script")
</head>
<body>
    <div id="siteContain">
        <div id="header">
            <div class="logo">
                <a href="#"><img src="/images/top.gif" style=" height:71px" /></a></div>
            <div class="tuichu">
                <a href="/account/logoff"><img src="/images/tc_img.gif" /></a></div>
            <div class="xia">
            </div>
        </div>
        <div id="contain">
            <div id="navigation">
                <div class="gnl">
                    <img src="/images/gnl_bg.gif" /></div>
                <div class="lanmu">
                    <ul>
                        <li>@Sprite.Image("~/App_Sprites/script.png")<span>修改密码</span></li>
                    </ul>
                </div>
            </div>
            <div id="primaryContent">
                <div id="contentCover" class="ui-widget-overlay jqgrid-overlay" style="display: none; z-index: 200; top: 42px">
                </div>
                <div id="contentLoading" class="loading ui-state-default ui-state-active" style="display: none; z-index: 201">
                    读取中...</div>
                @RenderPage("~/Views/Shared/Desktop.cshtml") 
                @*@{Html.RenderAction("Desktop", "Home");}*@
            </div>
            <div class="xia">
            </div>
        </div>
        <div id="footer">
        </div>
    </div>
    
    @RenderSection("Content")
    @*<div class="ui-widget ui-widget-content" style="width: 100%; height: 50px;">
    </div>
    <div id="LeftPane" class="ui-layout-west ui-widget ui-widget-content" style="float: left; visibility: visible; display: block; margin: 0px; left: 0px; right: auto; top: 0px; bottom: 0px; height: 90%; width: 198px;">
        @RenderPage("~/Views/Shared/_LeftMenu.cshtml")
        @{Html.RenderPartial("~/Views/Shared/_LeftMenu.cshtml");}
    </div>
    <div id="RightPane" class="ui-layout-center ui-helper-reset ui-widget-content" style="visibility: visible; display: block; margin-left: 198px; left: 206px; right: 0px; top: 0px; bottom: 0px; height: 90%;">
        <!-- Tabs pane -->
        <div id="switcher">
        </div>
        @{Html.RenderAction("Desktop", "Home");}
        @{Html.RenderAction("Index", "Delivery");}
    </div>*@
</body>
</html>
